
import CLI.CLIBuilder;
import GUI.GUIBuilder;
import domain.DomainController;
import domain.MineField;
import domain.MineFieldFactory;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author "Jeroen"
 */
public class StartUp {

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex);
        }
        DomainController dc = new DomainController();
        // TODO should not be instantiatied here.
        dc.createGame();
       // if (args.length != 0 && args[0].toLowerCase().equals("gui")) {
            new GUIBuilder(dc);
       // } else {
            new CLIBuilder(dc);
       // }
    }
}
